import {onActivated, reactive} from 'vue'
import {useRoute} from 'vue-router'

export default function(getList) {
  const route = useRoute()
  var data = reactive({
    fullPath: ''
  })

  onActivated(() => {
    console.log(data.fullPath)
    console.log(route.fullPath)
    if (data.fullPath) {
      if (route.fullPath != data.fullPath) {
        getList()
      }
    }
    data.fullPath = route.fullPath
  })

  return {

  }
}

